package com.wxzz.elearing.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.wxzz.elearing.user.dto.*;
import com.wxzz.elearing.user.entity.AdminUser;
import com.wxzz.elearing.user.entity.LoginLog;
import com.wxzz.elearning.common.vo.JgPageVo;
import com.wxzz.elearning.common.vo.ReturnVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 系统用户 服务类
 * </p>
 *
 * @author
 * @since 2021-03-11
 */
public interface IAdminUserService extends IService<AdminUser> {


    /**
     * 后台账号登录
     *
     * @param adminLoginDto
     * @return
     */
    ReturnVO<AdminUser> adminUserLogin(AdminLoginDto adminLoginDto);

    /**
     * 新增后台账号
     *
     * @param adminUserInsDto
     * @return
     */
    ReturnVO<AdminUser> saveAdminUser(Long enterpriseId, AdminUserInsDto adminUserInsDto);

    /**
     * 列出登录日志
     *
     * @param loginLogDto
     * @return
     */
    ReturnVO<JgPageVo<LoginLog>> listLoginLog(Long enterpriseId,LoginLogDto loginLogDto);

    /**
     * 后台账号列表
     *
     * @return
     */
    ReturnVO<JgPageVo<List<AdminUser>>> listAdminUser(HttpServletResponse response, Long enterpriseId, AdminUserDto adminUserDto);

    /**
     * 密码找回发送验证码
     * @return
     */
    ReturnVO sendCode(SendCodeDto sendCodeDto);

    /**
     * 根据账号修改密码
     * @param updatePasswordDto
     * @return
     */
    ReturnVO updatePassword(UpdatePasswordDto updatePasswordDto);

    /**
     * 帐号管理删除
     * @param adminUserId
     * @return
     */
    ReturnVO deleteByAdminUserId(Long adminUserId);
}
